ifndef CONTIKI
  CONTIKI=$(HOME)/local/contiki-2.4
endif

VPATH = . $(CONTIKI)/platform/avr-ravenlcd

include $(CONTIKI)/platform/avr-ravenlcd/Makefile

HEX_FLASH_FLAGS += -R .fuse
INCLUDES = -I$(CONTIKI)/platform/avr-ravenlcd

upload: $(PROJECT).hex $(PROJECT).eep
	avarice -2 -j usb -R --erase
	sleep 2
	avrdude -c jtag2 -P usb -p atmega3290p -U efuse:w:0xFF:m -U lfuse:w:0xE2:m -U hfuse:w:0x99:m -U eeprom:w:$(PROJECT).eep -U flash:w:$(PROJECT).hex

